package cn.kbyue.exceptiondemo.dto;

import cn.kbyue.exceptiondemo.common.validate.DriverChecks;
import cn.kbyue.exceptiondemo.common.validate.WeatherChecks;
import lombok.Data;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author xlang
 * @date 2023/4/4 11:04
 */
@Data
public class TravelBody implements Serializable {

    @Pattern(regexp = "^老司机$", message = "必须是老司机", groups = DriverChecks.class)
    private String driver;

    @Pattern(regexp = "^(晴天)$", message = "必须是晴天", groups = WeatherChecks.class)
    private String weather;

}
